package ldh.im.fxbase.data.pojo;

import ldh.im.fxbase.data.pojo.status.ImFileStatus;

import java.util.Date;

public class ImFile {

    private Long id;
    private String currentUserId;
    private String sessionId;
    private String userId;
    private String messageId;
    private String fileName;
    private Integer fileSize;
    private String path;
    private Boolean isRelativePath;  // 上传时，绝对路径。其它时是相对路径
    private String suffix;
    private ImFileStatus status;
    private Date createTime;
    private Date updateTime;

    private transient ImSession session;
    private transient ImMessage message;

    public ImFile() {
        createTime = new Date();
        updateTime = createTime;
        status = ImFileStatus.enable;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCurrentUserId() {
        return currentUserId;
    }

    public void setCurrentUserId(String currentUserId) {
        this.currentUserId = currentUserId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer fileSize) {
        this.fileSize = fileSize;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public ImFileStatus getStatus() {
        return status;
    }

    public void setStatus(ImFileStatus status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public ImSession getSession() {
        return session;
    }

    public void setSession(ImSession session) {
        this.session = session;
    }

    public ImMessage getMessage() {
        return message;
    }

    public void setMessage(ImMessage message) {
        this.message = message;
    }

    public Boolean getRelativePath() {
        return isRelativePath;
    }

    public void setRelativePath(Boolean relativePath) {
        isRelativePath = relativePath;
    }
}
